package com.jinyijia.api.rest.v1;

import lombok.Data;

/**
 * @author WX
 * @date 2018/8/21
 **/
@Data
public class Result {
    private Boolean status;
    private String message;
    private Object content;

    public Result(String message) {
        this.message = message;
    }

    public Result(Object content) {
        this.content = content;
    }

    public static Result error(String message) {
        Result result = new Result(message);
        result.setStatus(false);
        return result;
    }

    public static Result success(Object content) {
        Result result = new Result(content);
        result.setStatus(true);
        return result;
    }
}
